package com.foreknow.elmboot.controller;


import com.foreknow.elmboot.po.Deliveryaddress;
import com.foreknow.elmboot.service.DeliveryaddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("DeliveryAddressController")
public class DeliveryAddressController {
    @Autowired
    private DeliveryaddressService deliveryaddressService;
    @RequestMapping("listDeliveryAddressByUserId")
    public Object listDeliveryAddressByUserId(Deliveryaddress deliveryaddress){
        return deliveryaddressService.slistDeliveryAddressByUserId(deliveryaddress);
    };
    @RequestMapping("getDeliveryAddressById")
    public Object getDeliveryAddressById(Deliveryaddress deliveryaddress){
        return deliveryaddressService.sgetDeliveryAddressById(deliveryaddress);
    };
    @RequestMapping("saveDeliveryAddress")
    public Object saveDeliveryAddress(Deliveryaddress deliveryaddress){
        return deliveryaddressService.dsaveDeliveryAddress(deliveryaddress);
    };
    @RequestMapping("updateDeliveryAddress")
    public Object updateDeliveryAddress (Deliveryaddress deliveryaddress){
        return deliveryaddressService.dupdateDeliveryAddress(deliveryaddress);
    };
    @RequestMapping("removeDeliveryAddress")
    public Object removeDeliveryAddress (Deliveryaddress deliveryaddress){
        return deliveryaddressService.dremoveDeliveryAddress(deliveryaddress);
    };
}
